<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <!-- 上述3个meta标签*必须*放在最前面，任何其他内容都*必须*跟随其后！ -->
    <title>《PHP网站开发》课程作业信息收集表单</title>
    <!-- Bootstrap -->
    <link href="<?php echo base_url() . 'application/views/bootstrap/css/bootstrap.min.css' ?>" rel="stylesheet">
    <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
      <script src="https://cdn.bootcss.com/html5shiv/3.7.3/html5shiv.min.js"></script>
      <script src="https://cdn.bootcss.com/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
    <style type="text/css">
    .studentinfo {
        margin-top: 50px;
    }

    .mar {
        margin-right: 12px;
    }

    .form-group p {
        margin-top: 10px;
    }

    a.info {
        display: block;
        margin-top: 10px;
        text-align: center;
    }
    </style>
</head>

<body>
    <div class="container">
        <div class="row">
            <div class="col-md-6 col-md-offset-3">
                <div class="panel panel-default studentinfo">
                    <div class="panel-heading">
                        <h3 class="panel-title">《PHP网站开发》课程作业信息收集表单</h3>
                    </div>
                    <div class="panel-body">
                        <form method="post" action="<?php echo site_url('welcome/handle') ?>">
                            <div class="form-group">
                                <label>姓名</label>
                                <input type="text" class="form-control" name="stuname" placeholder="请输入您的姓名" autofocus required value="<?php echo set_value('stuname'); ?>">
                                <?php echo form_error('stuname'); ?>
                            </div>
                            <div class="form-group">
                                <label>学号</label>
                                <input type="text" class="form-control" name="stunumber" placeholder="请输入您的学号" required value="<?php echo set_value('stunumber'); ?>">
                                <?php echo form_error('stunumber'); ?>
                            </div>
                            <div class="form-group">
                                <label>班级</label>
                                <div>
                                    <label class="radio-inline">
                                        <input type="radio" name="stuclass" id="inlineRadio1" value="0" <?php echo set_radio( 'stuclass', '0', TRUE); ?> /> 56节
                                    </label>
                                    <label class="radio-inline">
                                        <input type="radio" name="stuclass" id="inlineRadio2" value="1" <?php echo set_radio( 'stuclass', '1'); ?> /> 78节
                                    </label>
                                </div>
                            </div>
                            <div class="form-group">
                                <label>仓库地址</label>
                                <input type="url" name="stuurl" class="form-control" placeholder="如https://git.coding.net/adamyang/learingphp.git" required value="<?php echo set_value('stuurl'); ?>">
                                <?php echo form_error('stuurl'); ?>
                            </div>
                            <button type="submit" class="btn btn-primary btn-lg btn-block">提交信息</button>
                            <a class="info" href="<?php echo site_url('welcome/display/'); ?>">
                                <p>查看已提交信息</p>
                            </a>
                        </form>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
    <script src="https://cdn.bootcss.com/jquery/1.12.4/jquery.min.js"></script>
    <!-- Include all compiled plugins (below), or include individual files as needed -->
    <script src="<?php echo base_url('application/views/bootstrap/js/bootstrap.min.js') ?>"></script>
    <script type="text/javascript">
    $(".form-group p").addClass('alert alert-danger');
    </script>
</body>

</html>